# Copyright (c) 2020 vesoft inc. All rights reserved.
#
# This source code is licensed under Apache 2.0 License,
# attached with Common Clause Condition 1.0, found in the LICENSES directory.

SET(EXEC_QUERY_TEST_OBJS
    $<TARGET_OBJECTS:common_expression_obj>
    $<TARGET_OBJECTS:common_network_obj>
    $<TARGET_OBJECTS:common_process_obj>
    $<TARGET_OBJECTS:common_graph_thrift_obj>
    $<TARGET_OBJECTS:common_storage_client_base_obj>
    $<TARGET_OBJECTS:common_graph_storage_client_obj>
    $<TARGET_OBJECTS:common_storage_thrift_obj>
    $<TARGET_OBJECTS:common_meta_client_obj>
    $<TARGET_OBJECTS:common_stats_obj>
    $<TARGET_OBJECTS:common_time_obj>
    $<TARGET_OBJECTS:common_meta_thrift_obj>
    $<TARGET_OBJECTS:common_common_thrift_obj>
    $<TARGET_OBJECTS:common_thrift_obj>
    $<TARGET_OBJECTS:common_meta_obj>
    $<TARGET_OBJECTS:common_thread_obj>
    $<TARGET_OBJECTS:common_fs_obj>
    $<TARGET_OBJECTS:common_base_obj>
    $<TARGET_OBJECTS:common_concurrent_obj>
    $<TARGET_OBJECTS:common_datatypes_obj>
    $<TARGET_OBJECTS:common_conf_obj>
    $<TARGET_OBJECTS:common_file_based_cluster_id_man_obj>
    $<TARGET_OBJECTS:common_charset_obj>
    $<TARGET_OBJECTS:common_function_manager_obj>
    $<TARGET_OBJECTS:common_agg_function_manager_obj>
    $<TARGET_OBJECTS:common_encryption_obj>
    $<TARGET_OBJECTS:common_http_client_obj>
    $<TARGET_OBJECTS:common_time_utils_obj>
    $<TARGET_OBJECTS:common_ft_es_graph_adapter_obj>
    $<TARGET_OBJECTS:common_ws_common_obj>
    $<TARGET_OBJECTS:common_version_obj>
    $<TARGET_OBJECTS:graph_session_obj>
    $<TARGET_OBJECTS:graph_flags_obj>
    $<TARGET_OBJECTS:parser_obj>
    $<TARGET_OBJECTS:validator_obj>
    $<TARGET_OBJECTS:planner_obj>
    $<TARGET_OBJECTS:scheduler_obj>
    $<TARGET_OBJECTS:executor_obj>
    $<TARGET_OBJECTS:util_obj>
    $<TARGET_OBJECTS:idgenerator_obj>
    $<TARGET_OBJECTS:context_obj>
    $<TARGET_OBJECTS:graph_auth_obj>
    $<TARGET_OBJECTS:expr_visitor_obj>
    $<TARGET_OBJECTS:common_graph_obj>
)

SET(EXEC_QUERY_TEST_LIBS
    ${THRIFT_LIBRARIES}
    gtest
    wangle
    ${PROXYGEN_LIBRARIES}
)

nebula_add_test(
    NAME
        executor_test
    SOURCES
        TestMain.cpp
        LogicExecutorsTest.cpp
        ProjectTest.cpp
        UnwindTest.cpp
        GetNeighborsTest.cpp
        DataCollectTest.cpp
        SetExecutorTest.cpp
        FilterTest.cpp
        DedupTest.cpp
        LimitTest.cpp
        SortTest.cpp
        TopNTest.cpp
        AggregateTest.cpp
        JoinTest.cpp
        BFSShortestTest.cpp
        ConjunctPathTest.cpp
        ProduceSemiShortestPathTest.cpp
        ProduceAllPathsTest.cpp
        CartesianProductTest.cpp
        AssignTest.cpp
        ShowQueriesTest.cpp
    OBJECTS
        ${EXEC_QUERY_TEST_OBJS}
    LIBRARIES
        ${EXEC_QUERY_TEST_LIBS}
)
